/** When your routing table is too long, you can split it into small modules**/

import Layout from '@/layout'

const workManagementRouter = {
  path: '/workManagement',
  component: Layout,
  redirect: '/workManagement/projectInfo',
  name: 'WorkManagement',
  meta: {
    title: '工程管理',
    icon: 'example',
    roles: ['project']
  },
  children: [{
    path: 'projectInfo',
    name: 'ProjectInfo',
    component: () => import('@/views/workManagement/index'),
    meta: {
      title: '工程信息',
      // icon: 'table',
      roles: ['projectInfo:get']
    }
  },
  // {
  //   path: 'personnelInfo',
  //   name: 'PersonnelInfo',
  //   component: () => import('@/views/workManagement/personnelInfo'),
  //   meta: {
  //     title: '人员信息'
  //   }
  // },
  {
    path: 'organizationaStructure',
    name: 'OrganizationaStructure',
    component: () =>
          import('@/views/organizationaStructure/index'),
    meta: {
      title: '组织架构',
      // icon: 'tree',
      roles: ['team:get']
    }
  },
  {
    path: 'roleUser',
    name: 'RoleUser',
    component: () => import('@/views/roleUser/index'),
    meta: {
      title: '角色',
      // icon: 'User Settings',
      roles: ['role:get']
    }
  },
  {
    path: 'roleLink',
    name: 'RoleLink',
    component: () => import('@/views/roleUser/roleLink'),
    hidden: true,
    meta: {
      title: '关联权限',
      parentRouter: {
        path: 'roleUser',
        meta: {
          title: '角色'
        }
      }
    }
  }
  ]
}

export default workManagementRouter
